﻿@model VideoCache.Server.ViewModel.UserCollectionModel
@{
    ViewBag.Title = "用户管理";
}
<h2>@ViewBag.Title</h2>
<p>
    <a href="@Url.Action("Create")" class="button">新建</a>
    <a href="@Url.Action("Delete")" class="selectDelete button" group="chk">删除</a>
</p>
<table width="100%" class="list">
<thead>
    <tr>
        <th width="10"><input type="checkbox" group="chk" class="selectAll" /></th>
        <th width="50">ID</th>
        <th width="150">用户名</th>
        <th>电子邮件</th>
        <th>手机号码</th>
        <th>注册时间</th>
        <th>最后登录时间</th>
        <th width="120"></th>
    </tr>
</thead>
<tbody>
@foreach (var item in Model.Items) {
    <tr>
        <td><input type="checkbox" group="chk" value="@item.Id" /></td>
        <td>@item.Id</td>
        <td>@item.UserName</td>
        <td>@item.Email</td>
        <td></td>
        <td width="120">@String.Format("{0:g}", item.CreateTime)</td>
        <td width="120">@String.Format("{0:g}", item.LastLoginTime)</td>
        <td>
            @Html.ActionLink("权限", "UserRoles", new { id = item.Id }) |
            @Html.ActionLink("修改", "Edit", new { id = item.Id }) |
            @Html.ActionLink("删除", "Delete", new { id = item.Id }, new { @class = "delete" })
        </td>
    </tr>
}
</tbody>
</table>
<div class="pager">
@Html.Pager("page", Model.PageSize, Model.RecordCount)
</div>